#include "stdafx.h"
#include "Fix.h"

Fix::Fix()
{
}

void Fix::ParseDictionary(Dictionary p_Dictionary)
{
	Dictionary::iterator p = p_Dictionary.begin();
	Name = p->second; p++;
	Location.Y = p->second; p++;
	Location.X = p->second; p++;
	NavaId = p->second; p++;
	Report = (p->second.compare("true")==0 ? true : false);
}

std::string Fix::Key()
{
	return Name;
}

void Fix::Print()
{
	Point t_Point = Location;
	std::cout << "Name: " << Name << std::endl;
	std::cout << "Latitude: " << Location.Y << std::endl;
	std::cout << "Longitude: " << Location.X << std::endl;
	std::cout << "X: " << t_Point.X << std::endl;
	std::cout << "Y: " << t_Point.Y << std::endl;
	std::cout << "------------------------------" << std::endl;
	getchar();
}

FixMap::FixMap() : AdaptationMap<Fix>(FIXADAPTFILENAME)
{
}
